package com.industrial.premu.controller.doc;

import com.industrial.common.core.web.domain.AjaxResult;
import com.industrial.premu.service.IPreMuGenDocxService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 获取生成Word的数据
 * @author sangguangcan
 */
@RestController
@RequestMapping("/gen/docx")
public class PreMuGenDocxController {

    @Autowired
    private IPreMuGenDocxService preMuGenDocxService;


    /**
     * <p>
     *     查询第一页的数据
     * </p>
     * @return
     */
    @GetMapping("/queryOnePageData")
    public AjaxResult queryOnePageData(){
       Map<String,String> result = preMuGenDocxService.queryOnePageData();
       return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询第二页的数据
     * </p>
     * @return
     */
    @GetMapping("/queryTwoPageData")
    public AjaxResult queryTwoPageData(){
        Map<String,Object> result = preMuGenDocxService.queryTwoPageData();
        return AjaxResult.success(result);
    }
    /**
     * <p>
     *     查询第三页的数据
     * </p>
     * @return
     */
    @GetMapping("/queryThreePageData")
    public AjaxResult queryThreePageData(){
        Map<String,Object> result = preMuGenDocxService.queryThreePageData();
        return AjaxResult.success(result);
    }

    /**
     * <p>
     *     查询第四页的数据
     * </p>
     * @return
     */
    @GetMapping("/queryFourPageData")
    public AjaxResult queryFourPageData(){
        Map<String,Object> result = preMuGenDocxService.queryFourPageData();
        return AjaxResult.success(result);
    }

    /**
     * 查询第18页数据
     * @return
     */
    @GetMapping("/queryEighteenPageData")
    public AjaxResult queryEighteenPageData(){
        Map<String,Object> r = preMuGenDocxService.queryEighteenPageData();
        return AjaxResult.success(r);
    }

    /**
     * 分市单位要素产出情况
     * @return
     */
    @GetMapping("/queryTwentyThree")
    @ApiOperation("分市单位要素产出情况--23页数据")
    public AjaxResult queryTwentyThree(){
        Map<String,Object> r = preMuGenDocxService.queryTwentyThree();
        return AjaxResult.success(r);
    }

    /**
     * 单位污染物排放销售收入
     * @return
     */
    @GetMapping("/queryUnitPollutantEmissionSalesIncome")
    public AjaxResult queryUnitPollutantEmissionSalesIncome(){
        return preMuGenDocxService.queryUnitPollutantEmissionSalesIncome();
    }

    /**
     * 各市研发经费投入强度
     * @return
     */
    @GetMapping("/queryResearchExpenditureIntensity")
    public AjaxResult queryResearchExpenditureIntensity(){
        return preMuGenDocxService.queryResearchExpenditureIntensity();
    }

    /**
     * 查询全员劳动生产力
     * @return
     */
    @GetMapping("/queryTotalLaborProductivity")
    public AjaxResult queryTotalLaborProductivity(){
        return preMuGenDocxService.queryTotalLaborProductivity();
    }

    /**
     * 查询规下企来的参评情况
     * @return
     */
    @GetMapping("/queryMicroIndustrialEnterprisesParticipation")
    @ApiOperation("查询规下企来的参评情况")
    public AjaxResult queryMicroIndustrialEnterprisesParticipation(){
        return preMuGenDocxService.queryMicroIndustrialEnterprisesParticipation();
    }
}
